<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>行程顾问管理</title>
	<meta name="decorator" content="default"/>
<link href="${ctxStatic}/jquery-ui-1.12.1/jquery-ui.min.css" rel="stylesheet" />
<script src="${ctxStatic}/jquery-ui-1.12.1/jquery-ui.min.js" type="text/javascript"></script>
<script src="${ctxStatic}/js/messages_zh.js" type="text/javascript"></script>
<script src="${ctxStatic}/js/jquery.validate.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {	
/*表单验证*/
$('#inputForm').validate({
    rules:{
     day:"required",
     route: "required",
     meals: "required",
     distance:"required",
     hotel:"required",
     info:"required"
    },	    
   messages:{
	   day:"请输入天数",
	   route: "请输入路线",
	   meals: "请输入餐饮",
	   distance:"请输入距离",
	   hotel:"请输入住宿",
	   info:"请输入内容"
   }  
});			
});
</script>

</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="javascript:">添加</a></li>
	</ul>
	<form:form id="inputForm" modelAttribute="tripCounselorInfo"
		action="${ctx}/trip/tTrip/save" method="post" class="form-horizontal">
		<form:hidden path="tripCounselorId" />
		<div class="control-group">
			<label class="control-label">天数：</label>
			<div class="controls">
				<form:input path="day" htmlEscape="false" maxlength="20"
						class="span4 required" name="name" />
						
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">路线：</label>
			<div class="controls">
				<form:input path="route" htmlEscape="false" maxlength="40"
						class="span4 required" name="stock"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">餐饮：</label>
			<div class="controls">
				<form:input path="meals" htmlEscape="false" maxlength="20"
						class="span4 required" name="stock"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">距离：</label>
			<div class="controls">
				<form:input path="distance" htmlEscape="false" maxlength="20"
						class="span4 required" name="minprice"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">住宿：</label>
			<div class="controls">
				<form:input path="hotel" htmlEscape="false" maxlength="20"
						class="span4 required" name="limit"/>
			</div>
		</div>
		
		<div class="control-group">
			<label class="control-label">内容：</label>
			<div class="controls">
				<form:textarea path="info" htmlEscape="false" maxlength="3000"
						class="span4 " />
			</div>
		</div>
		<div class="form-actions">
				<input id="btnSubmit" class="btn btn-primary" type="submit"
					value="保 存" />&nbsp;
			<input id="btnCancel" class="btn" type="button" value="返 回"
				onclick="history.go(-1)" />
		</div>
	</form:form>	
</body>
</html>